﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class UserControl_SanPhamDetails : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
        //SanPhamDetails dt=new SanPhamDetails();
        //SanPham s = dt.getDetail("B00001");
        //lblMaSP.Text = s.Sanphamid;
        //lblGia.Text = "Giá: " + s.Giaban + "$";
        //lblMota.Text = s.Gioithieu;
        BuilderHinhAnh b=new BuilderHinhAnh();
        Label1.Text = b.showImage(Request.QueryString["ID"]);

    }
    protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
    {
        try
        {
            ImageButton button = (ImageButton)sender;
            GioHang gh = new GioHang();
            gh = (GioHang)Session["GioHang"];
            gh.Add(button.CommandArgument);
            Session["GioHang"] = gh;
            Response.Redirect("Giohang.aspx");
        }
        catch (Exception)
        {
            
            throw;
        }
    }
}